home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 #2 / Ham Radio 2000 - Volume 2.iso / HAMV2 / MISC / HCAL-27 / TIMEZONE.BAS (.txt) < prev    next >
Encoding:
GW-BASIC  |  1997-01-29  |  3.8 KB  |  125 lines

  1. 10  'TIMEZONE - Time Zones - 09 MAR 96 rev. 28 SEP 96
  2. 20  IF EX$=""THEN EX$="EXIT"
  3. 30  CLS:KEY OFF
  4. 40  COLOR 7,0,1
  5. 50  UL$=STRING$(80,205)
  6. 60  DIM P$(24)
  7. 70  DATA ADAK (ALASKA) & FIJI,NEW CALEDONIA,PAPUA & SAIPAN
  8. 80  DATA VLADIVOSTOK & ADELAIDE,SHANGHAI & MAYLASIA,CHRISTMAS ISLAND & CHUNKING
  9. 90  DATA BANGLADESH & RANGOON,PAKISTAN & BOMBAY,OMAN & KANDAHAR
  10. 100  DATA KUWAIT & MADAGASCAR,CAIRO & ISTANBUL,PRAGUE & STOCKHLOM
  11. 110  DATA "GREENWICH, ENGLAND",CANARY ISLANDS & CHAD,THE AZORES & SCORESBYSUND
  12. 120  DATA RIO de JANEIRO & NEWFOUNDLAND,BERMUDA & GOOSE BAY,OTTAWA & NASSAU
  13. 130  DATA NEW ORLEANS & GUATEMALA,WYOMING & CHIHUAHUA,LOS ANGELES & VANCOUVER
  14. 140  DATA PITCAIRN ISAND & WHITEHORSE,HAWAII & FAIRBANKS,RARATONGA & NOME
  15. 150  FOR Z=24 TO 1 STEP-1:READ P$(Z):NEXT Z
  16. 160  '
  17. 170  '.....start
  18. 180  COLOR 15,2
  19. 190  PRINT " TIME ZONES (Universal Co-Ordinated Time)";
  20. 200  PRINT TAB(57);"by George Murphy VE3ERP ";
  21. 210  COLOR 1,0:PRINT STRING$(80,223);
  22. 220  COLOR 7,0
  23. 230  '
  24. 240  GOSUB 710  'preface
  25. 250  PRINT
  26. 260  COLOR 0,7:LOCATE 25,22
  27. 270  PRINT " Press 1 to continue or 0 to EXIT.....";
  28. 280  COLOR 7,0
  29. 290  Z$=INKEY$:IF Z$=""THEN 290
  30. 300  IF Z$="0"THEN CLS:RUN EX$
  31. 310  IF Z$="1"THEN 340
  32. 320  GOTO 290
  33. 330  '
  34. 340  COLOR 0,7:LOCATE 25,1
  35. 350  INPUT " ENTER: Reference time in UTC (e.g. 0517, 1625, etc.)....";ZU
  36. 360  COLOR 7,0
  37. 370  ZU=ABS(ZU)
  38. 380  '
  39. 390  '.....zones
  40. 400  CLS:COLOR ,,0
  41. 410  A=172.5
  42. 420  LN=0      'line number
  43. 430     FOR Z=-11 TO 12
  44. 440  LN=LN+1
  45. 450  ZULU=ZU+Z*100
  46. 460  IF ZULU>=2400 THEN ZULU=ZULU-2400:DA$=" tomorrow  in ":GOTO 500
  47. 470  IF ZULU<0 THEN ZULU=ZULU+2400:    DA$=" yesterday in ":GOTO 500
  48. 480  IF Z=0 THEN                       DA$=" TODAY     in ":COLOR 14,1:GOTO 500
  49. 490                                    DA$=" today     in ":COLOR 0,7:
  50. 500  Z$=STR$(ZULU):Z$=RIGHT$(Z$,LEN(Z$)-1)
  51. 510  IF LEN(Z$)<4 THEN Z$="0"+Z$:GOTO 510
  52. 520  Z$=RIGHT$(Z$,4)
  53. 530  IF Z>0 THEN A=A+15 ELSE A=A-15
  54. 540  IF Z<0 THEN A$="<UNK! {00F8}>W":B$=A$
  55. 550  IF Z=0 THEN A$="<UNK! {00F8}>W":B$="<UNK! {00F8}>E"
  56. 560  IF Z>0 THEN A$="<UNK! {00F8}>E":B$=A$
  57. 570  B=A+15:IF B>180 THEN B=B-360:B$="<UNK! {00F8}>W"
  58. 580  PRINT USING "####.#";ABS(A);:PRINT A$;
  59. 590  PRINT " to";USING "####.#";ABS(B);:PRINT B$;" = ";
  60. 600  PRINT "UTC ";
  61. 610  IF Z=0 THEN Q$="   "ELSE Q$=" = "
  62. 620  IF Z=0 THEN PRINT Q$;:GOTO 640
  63. 630  PRINT USING "+##";Z;
  64. 640  PRINT Q$;Z$;DA$;P$(LN)+STRING$(30-LEN(P$(LN))," ");
  65. 650  COLOR 7,0
  66. 660  IF Z<12 THEN PRINT "";
  67. 670     NEXT Z
  68. 680  GOSUB 1120
  69. 690  CLS:COLOR ,,1:GOTO 170
  70. 700  '
  71. 710  '.....preface
  72. 720  T=7
  73. 730  PRINT TAB(T);
  74. 740  PRINT "Times shown are local times. Not all countries or areas follow the"
  75. 750  PRINT TAB(T);
  76. 760  PRINT "International Time Zone System, but will use the time of some"
  77. 770  PRINT TAB(T);
  78. 780  PRINT "principal city as a standard or will have no standard time at all."
  79. 790  PRINT TAB(T);
  80. 800  PRINT "In some areas or on groups of islands the system is applied with"
  81. 810  PRINT TAB(T);
  82. 820  PRINT "certain local deviations made necessary by frontiers or to permit"
  83. 830  PRINT TAB(T);
  84. 840  PRINT "an entire island group to have the same time zone."
  85. 850  PRINT
  86. 860  PRINT TAB(T);
  87. 870  PRINT "The time used in each area, whether it is the time of the"
  88. 880  PRINT TAB(T);
  89. 890  PRINT "corresponding zone or modified time, is fixed by law and is called"
  90. 900  PRINT TAB(T);
  91. 910  PRINT "legal time, or more generally, standard time. Another deviation is"
  92. 920  PRINT TAB(T);
  93. 930  PRINT "that certain areas, for economic reasons, modify their legal time"
  94. 940  PRINT TAB(T);
  95. 950  PRINT "for part of the year (especially in summer) by advancing it an hour"
  96. 960  PRINT TAB(T);
  97. 970  PRINT "or another fraction of time (e.g. Daylight Saving Time)."
  98. 980  PRINT
  99. 990  PRINT TAB(T);
  100. 1000  PRINT "Cities and countries displayed are located within the geographic"
  101. 1010  PRINT TAB(T);
  102. 1020  PRINT "limits indicated by the meridians shown, but may observe a legal"
  103. 1030  PRINT TAB(T);
  104. 1040  PRINT "time different from the UTC standard time for that zone."
  105. 1050  PRINT
  106. 1060  PRINT TAB(T);
  107. 1070  PRINT "The times 0000 & 2400 (midnight) are interchangeable. 0000 refers"
  108. 1080  PRINT TAB(T);
  109. 1090  PRINT "to the day just begun, 2400 to the day just ended.";
  110. 1100  RETURN
  111. 1110  '
  112. 1120  'HARDCOPY
  113. 1130  GOSUB 1240:LOCATE 25,2:COLOR 14,6
  114. 1140  PRINT " Press 1 to print screen, 2 to print screen & ";
  115. 1150  PRINT "advance paper, or 3 to continue.";:COLOR 7,0
  116. 1160  Z$=INKEY$:IF Z$="3"THEN GOSUB 1240:RETURN
  117. 1170  IF Z$="1"OR Z$="2"THEN GOSUB 1240:GOTO 1190
  118. 1180  GOTO 1160
  119. 1190  FOR QX=1 TO 24:FOR QY=1 TO 80
  120. 1200  LPRINT CHR$(SCREEN(QX,QY));
  121. 1210  NEXT QY:NEXT QX
  122. 1220  IF Z$="2"THEN LPRINT CHR$(12)
  123. 1230  GOTO 1130
  124. 1240  LOCATE 25,1:PRINT STRING$(80,32);:RETURN
  125.